import { createRouter, createWebHashHistory } from "vue-router";

//1.声明routes配置，一个routes是一个组件，routes对象里面的基本属性有path 和component组成
let routes = [
   {
    name:'login',//具名路由
    path:'/login',
    component:()=>import(/*webpackChunkName:'login' */'../pages/login/index.vue')
   },
   
   
];
//2.创建路由
const router = createRouter({
  history: createWebHashHistory(''),
  routes,
});
//3.导出路由
export default router;